package com.example.demo.Controller;


import com.example.demo.Entity.Department;
import com.example.demo.dao.EmpMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RequestMapping(value = {"/dep"})
@Controller
public class DepartmentController {
    @Autowired
    EmpMapper departmentMapper;

    @GetMapping(value = {"/insertDep"})
    @ResponseBody
    public Department insertDep(Department department){
        int i = departmentMapper.insertDep(department);
        System.out.println("i: "+ i);
        return department;

    }

}
